from django.db import models
from django.contrib.auth.hashers import make_password

# Create your models here.
class users(models.Model):
    id = models.AutoField(primary_key=True)
    username = models.CharField(max_length=20)
    password = models.CharField(max_length=200)
    mobile = models.CharField(max_length=11)
    avatar = models.CharField(max_length=255)
    gender = models.IntegerField(default=0)
    role = models.CharField(max_length=20, default='user')
    create_time = models.IntegerField(default=0)
    update_time = models.IntegerField(default=0)
    reg_ip = models.CharField(max_length=50)
    last_login_ip = models.CharField(max_length=50)
    status = models.IntegerField(default=1)
    class Meta:
        db_table = 'users'